<template>
  <img alt="Vue logo" src="./assets/logo.png" />
  <div class="editor"></div>
  <div class="editor2"></div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import HelloWorld from "./components/HelloWorld.vue";
import wrapper from "./utils/quill-wrapper";
import Quill from "quill";
import "quill/dist/quill.snow.css";
Quill.register(wrapper(HelloWorld), true);

export default defineComponent({
  name: "App",
  mounted() {
    let editor = new Quill(".editor", {
      theme: "snow",
    });
        let editor2 = new Quill(".editor2", {
      theme: "snow",
    });

    editor.insertEmbed(0, HelloWorld.name, {
      msg: "Hello Vue 3 + TypeScript + Vite",
    });
    
    editor2.setContents(editor.getContents())
  },
});
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
